<template>
  <div :class="['gy', theme]">
    <router-view class="page" />
  </div>
</template>
<script>
import { initStore } from '@/util/storage'
import { mapState, mapActions } from 'vuex'
export default {
  name: 'GY',
  components: {},
  props: {},
  data() {
    return {}
  },
  computed: {
    ...mapState({
      theme: state => state.setting.theme,

      online: state => state.login.online,
      token: state => state.login.token
    })
  },
  watch: {},
  beforeCreate() {},
  created() {
    this.online || this.setMenus()
    initStore()
  },
  beforeMount() {},
  mounted() {},
  beforeUpdate() {},
  updated() {},
  activated() {},
  deactivated() {},
  beforeDestroy() {},
  destroyed() {},
  methods: {
    ...mapActions({
      setMenus: 'menu/setMenus'
    })
  }
}
</script>
<style lang="scss">
@import '@/static/css/index.scss';
html,
body,
.gy,
.page {
  width: 100%;
  height: 100%;
}
body {
  margin: 0;
}
.gy,
input,
button,
textarea,
select {
  font-family: pfh, 'Microsoft YaHei', Tahoma, Helvetica, Arial, '\5b8b\4f53',
    sans-serif;
}
</style>
